namespace hjc {
	export class Chunk extends Entity {

		private $init: boolean;
		private $img: eui.Image;
		private $url: string;

		protected onActive(): void {
			if (!this.$init) {
				this.$img.source = this.$url;
				this.$init = true;
			}
		}

		public init(id?: string, img?: eui.Image, url?: string): void {
			this.$init = false;
			this.$img = null;
			this.$url = null;
			super.init(id);
			if (!!img) this.$img = img;
			if (!!url) this.$url = url;
			this.add(Aoi);
		}
	}
}